home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / timidsrc.zip / my < prev    next >
Text File  |  1996-05-21  |  928b  |  37 lines

  1. #!/bin/sh
  2.  
  3. # Attempt to mangle a Makefile in hopes that it might be useful, but
  4. # without any warranty whatsoever.  Shudder.
  5.  
  6. if [ "$*" = "mistake" ]; then
  7.   if [ -f Makefile.unmangled ]; then
  8.     echo "That's all right.  Here's your old Makefile back."
  9.     mv Makefile.unmangled Makefile
  10.     exit 0
  11.   else
  12.     echo "I don't know what you're talking about."
  13.     exit 1
  14.   fi
  15. fi
  16.  
  17. if [ "$*" = "make right or wrong" ]; then
  18.   if [ -e Makefile.unmangled ]; then
  19.     echo "I already mangled the Makefile.  Sorry, I'm a very stupid script."
  20.     exit 1
  21.   else
  22.     echo "I'll mangle this Makefile..."
  23.     mv Makefile Makefile.unmangled
  24.     if ! perl my.pl < Makefile.unmangled >Makefile; then
  25.       echo "It like didn't work or something.  Here's your old Makefile back."
  26.       mv Makefile.unmangled Makefile
  27.       exit 1
  28.     else
  29.       echo "Ha ha, there."
  30.       exit 0
  31.     fi
  32.   fi
  33. fi
  34.  
  35. echo "No, no, you didn't say it properly."
  36. exit 1
  37.